<template>
    <i class="wl-icon" :class="{ [`wl-icon--${type}`]: type }">
        <font-awesome-icon v-bind="filterProps"></font-awesome-icon>
    </i>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import propObj from './props';
import { omit } from 'lodash-es'
defineOptions({
    name: 'wl-icon'
})
const props = defineProps(propObj)
// 使用omit过滤不需要的属性
const filterProps = computed(() => omit(props, ['type']))
</script>

<style scoped lang="less"></style>